package com.micro.ai.template.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 模板使用统计实体
 *
 * @author micro-ai
 * @since 0.0.1
 */
@Data
@TableName("template_statistics")
@Schema(description = "模板使用统计")
public class TemplateStatistic {

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @Schema(description = "主键ID")
    private String id;

    @TableField("template_id")
    @Schema(description = "模板ID")
    private String templateId;

    @TableField("stat_date")
    @Schema(description = "统计日期")
    private LocalDate statDate;

    @TableField("view_count")
    @Schema(description = "浏览次数")
    private Integer viewCount;

    @TableField("download_count")
    @Schema(description = "下载次数")
    private Integer downloadCount;

    @TableField("use_count")
    @Schema(description = "使用次数")
    private Integer useCount;

    @TableField("favorite_count")
    @Schema(description = "收藏次数")
    private Integer favoriteCount;

    @TableField("rating_count")
    @Schema(description = "评分次数")
    private Integer ratingCount;

    @TableField("avg_rating")
    @Schema(description = "平均评分")
    private BigDecimal avgRating;

    @TableField("created_at")
    @Schema(description = "创建时间")
    private LocalDateTime createdAt;
}

